package com.songxh.domain.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.songxh.application.dto.SysRoleDTO;
import com.songxh.domain.service.api.SysRoleService;
import com.songxh.infrastructure.db.mapper.SysRoleMapper;
import com.songxh.infrastructure.db.pojo.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author songxh
 * @create 2022-12-19-15:49
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRoleDTO> getRoleByUserId(Long userId) {
        List<SysRoleDTO> roleDTOS = sysRoleMapper.getRoleByUserId(userId);
        return roleDTOS;
    }
}
